package app.itw.tison.cloud.order_service.client;


import app.itw.tison.cloud.order_service.client.fallback.ProductClientFallback;
import java.util.HashMap;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "product-service",fallbackFactory = ProductClientFallback.class)
public interface ProductClient {
    @GetMapping("/api/v1/product/get")
    String getProduct(@RequestParam(value = "id") String id);
    @PostMapping("/api/v1/product/gets")
    String getProducts(@RequestBody List<HashMap<String, Object>> list);
}
